import request from "@/utils/request.js";

// 添加收藏产品
let add_collect = (data) => request.post('/collect/add', data);

// 取消收藏产品
let del_collect = (data) => request.post('/collect/del', data);

// 地址列表
let address_list = (data) => request.get('/address/list', data);

// 获取城市数据
let city_list = (data) => request.get('/city_list', data);

// 修改/添加地址
let edit_address = (data) => request.post('/address/edit', data);

// 获取单个地址
let address_detail = (id, data) => request.get(`/address/detail/${id}`, data);

// 删除地址
let del_address = (data) => request.post('/address/del', data);

// 收藏列表
let collect_list = (data) => request.get('/collect/user', data);

// 取消收藏产品
let cancel_collect = (data) => request.post('/collect/del', data);

// 个人中心
let user_center = (data) => request.get('/user', data);

// 为你推荐
let hot_product = (data) => request.get('/product/hot', data);

export default {
	add_collect,
	del_collect,
	address_list,
	city_list,
	edit_address,
	address_detail,
	del_address,
	collect_list,
	cancel_collect,
	user_center,
	hot_product,
}